package Sort;

import java.util.Random;
import java.util.Scanner;

/**
 * Created by Lee on 2017/2/18.
 */
public class MergeSort {
    private static Comparable[] aux;
    public static void sort(Comparable[] a) {
        aux = new Comparable[a.length];
        sort(a,0,a.length-1);
    }

    public static void sort(Comparable[] a, int lo, int hi) {
        if (hi <= lo) {
            return;
        }
        int mid = lo + (hi - lo) / 2;
        sort(a, lo, mid);
        sort(a,mid+1,hi);
        merge(a,lo,mid,hi);
    }

    public static void merge(Comparable[] a, int lo, int mid, int hi) {
        int i = lo;
        int j = mid + 1;
        for(int k=lo;k<=hi;k++) {
            aux[k] = a[k];
        }
        for(int k=lo;k<=hi;k++) {
            if (i > mid) {
                a[k] = aux[j++];
            } else if (j > hi) {
                a[k] = aux[i++];
            } else if (less(aux[j], aux[i])) {
                a[k] = aux[j++];
            } else {
                a[k] = aux[i++];
            }
//            } else if (less(a[i], a[j])) {
//                a[k] = aux[i++];
//            } else {
//                a[k] = aux[j++];
//            }
        }
    }

    public static boolean less(Comparable v, Comparable w) {
        return v.compareTo(w) < 0;
    }

    private static void exch(Comparable[] a, int i, int j) {
        Comparable temp = a[i];
        a[i] = a[j];
        a[j] = temp;
    }

    private static void show(Comparable[] comparable) {
        for (Comparable t : comparable) {
            System.out.println(t);
        }
        System.out.println();
    }

    /*
    * Check the order
    * */
    private static boolean isSorted(Comparable[] a) {
        for (int i=1;i<a.length;i++) {
            if(less(a[i],a[i-1]))
                return false;
        }
        return true;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Double[] a;
//        System.out.println(less(new Double(2.0),new Double(4.0)));
//        System.out.println(less(new Double(4.0),new Double(2.0)));
        int N = sc.nextInt();
        a = new Double[N];
        Random random = new Random(10);
        for(int i=0;i<N;i++) {
//            a[i] = sc.nextDouble();

            a[i] = random.nextDouble()*1000;
        }

        sort(a);
        show(a);
    }


}
